<?php
defined('BASEPATH') OR exit('No direct script access allowed');


use QCloud_WeApp_SDK\Mysql\Mysql as DB;
use \QCloud_WeApp_SDK\Helper\Util as Util;
use \QCloud_WeApp_SDK\Constants as Constants;


class ProductSpec extends CI_Controller {
    public function index() {
        $id = $_GET['id'];
        $res = DB::select('cc_goods_sku', ['*'], ['goods_id' => $id]);

        if (!empty($res)){
            $this->json([
                'code' => 0,
                'data' => $res
            ]);
        } else {
            $this->json([
                'code' => -1,
                'error' => $res['error']
            ]);
        }
    }
}
